package org.dromara.exam.domain.bo;

import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.dromara.common.core.validate.AddGroup;

import java.util.List;

/**
 * 题目生成业务对象
 *
 * @author xiyin321
 * @since 2025/1/27
 */
@NoArgsConstructor
@Data
public class QuestionGenerateBo {

    @NotNull(message = "出题要求不能为空", groups = {AddGroup.class})
    private String requirements;

    private List<ChildrenDTO> children;

    @NoArgsConstructor
    @Data
    public static class ChildrenDTO {
        @NotNull(message = "题型不能为空", groups = {AddGroup.class})
        private String type;

        @NotNull(message = "数量不能为空", groups = {AddGroup.class})
        private int num;
    }
}
